package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.EmploymentMapper;
import com.jobpass.common.model.Employment;
import com.jobpass.common.service.EmploymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class EmploymentServiceImpl extends ServiceImpl<EmploymentMapper, Employment> implements EmploymentService {

    @Resource
    private EmploymentMapper employmentMapper;

    @Override
    public List<Employment> FindAllEmployment() {
        return employmentMapper.selectList(null);
    }

    @Override
    public Employment FindEmploymentById(Long id) {
        return employmentMapper.selectById(id);
    }

    @Override
    public int DeleteEmploymentById(Long id) {
        return employmentMapper.deleteById(id);
    }

    @Override
    public int UpdateEmploymentById(Employment employment) {
        return employmentMapper.updateById(employment);
    }

    @Override
    public int SavaEmployment(Employment employment) {
        return employmentMapper.insert(employment);
    }
}
